<include file="Public/header" />
<title>管理员列表</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 销售单管理 <span class="c-gray en">&gt;</span> 销售单修改 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="pd-20">

	<div class="cl pd-5 bg-1 bk-gray mt-20"> 
		<form class="formleft" name="" id="" action="__URL__/list_edit/" method="get">
			<span class="select-box" style="width:150px">
				<select class="select" id="selval" name="selval">
					<option value="1">单据编号</option>
				</select>
			</span>
			<input class="input-text" style="width:200px" type="text" value="<{$_GET['keywords']}>" placeholder="输入查询关键词" name="keywords" datatype="*" nullmsg="请填写搜索词">
			<button type="submit" class="btn btn-success"><i class="icon-plus"></i> 查询</button>	  
			
			<a class="btn btn-success radius" data-title="价格修改"  onclick="edit_price()" href="javascript:;"><i class="Hui-iconfont"></i> 价格修改</a>
			<a class="btn btn-success radius" data-title="损耗修改"  onclick="edit_wastage()" href="javascript:;"><i class="Hui-iconfont"></i> 损耗修改</a>
			<a class="btn btn-primary radius" data-title="费用分摊"  onclick="price_share()" href="javascript:;">费用分摊</a>
		</form>
		<span class="r">共有数据：<strong><{$count}></strong> 条</span> 
    </div>
	
	<table class="table table-border table-bordered table-bg">
		<thead>
			<tr>
				<th scope="col" colspan="15">采购单列表</th>
			</tr>
			<tr class="text-c">
				<th><input type="checkbox" name=""></th>
				<th>ID</th>
				<th width="">订单编号</th>
				<th width="">制单人</th>
				<th width="">采购人</th>
				<th width="">申请部门</th>
				<th width="">审核人</th>
				<th width="">添加时间</th>
				<th width="">状态</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list" id="vo">
			<tr class="text-c">
				<td><input type="checkbox" class="ids" name="ids" value="<{$vo.id}>" name=""></td>
				<td><{$vo.id}></td>
				<td><{$vo.order_no}></td>
				<td><{$vo.people_make_name.name}></td>
				<td><{$vo.people_purchasing_name.name}></td>
				<td><{$vo.section_name.name}></td>
				<td><if condition="$vo.examined_status eq 0" >暂无<else /><{$vo.auditor}></if></td>	
				<td><{$vo.make_add_time|date="Y-m-d H:i:s",###}></td>
				<td class="td-status"><if condition="$vo.examined_status eq 1"><span class="label label-success radius" onclick="admin_open('管理员编辑','__URL__/print_examinedetail/id/<{$vo.id}>','<{$vo.id}>','800','')" style="cursor:pointer">打印销售订单</span><else/><span class="label radius">暂存</span></if></td>
			</tr>
			</volist>
		</tbody>
	</table>
	<div class="pages mt" style="text-align:right"><{$page}></div>
</div>
<include file="Public/footer" />
<include file="Public/footer_js" />
<script>
	function edit_price(){
			var option = $(".ids");
			var checked_counts=0;
			var check_val = [];
            for(var i=0;i<option.length;i++){
				if(option[i].checked){
					checked_counts++;
					id=option[i].value;
				}
			}
			if(checked_counts>1){
				layer.msg('一次只能选中一个');
				return false;
			}
			var index=layer.open({
				type: 2,
				title: '修改价格',
				shadeClose: true,
				shade: 0.5,
				area: ['1000px', '500px'],
				content: '__MODULE__/Salesman/list_edit_detail/id/'+id+"/"+Math.random() //iframe的url
			});
    }
	
	function edit_wastage(){
			var option = $(".ids");
			var checked_counts=0;
			var check_val = [];
            for(var i=0;i<option.length;i++){
				if(option[i].checked){
					checked_counts++;
					id=option[i].value;
				}
			}
			if(checked_counts>1){
				layer.msg('一次只能选中一个');
				return false;
			}
			var index=layer.open({
				type: 2,
				title: '损耗修改',
				shadeClose: true,
				shade: 0.5,
				area: ['1000px', '500px'],
				content: '__MODULE__/Salesman/edit_wastage/id/'+id+"/"+Math.random() //iframe的url
			});
    }
	function price_share(){
			var option = $(".ids");
			var checked_counts=0;
			var check_val = [];
            for(var i=0;i<option.length;i++){
				if(option[i].checked){
					checked_counts++;
					id=option[i].value;
				}
			}
			if(checked_counts>1){
				layer.msg('一次只能选中一个');
				return false;
			}
			else{
				location.href= '__MODULE__/Salesman/price_share/id/'+id+"/"+Math.random();
			}
    }
</script>
</body>
</html>